public class ChargingMappingModel extends Object implements XMLMarshallable
ChargingMappingModel represents a charging mapping.
A chargingMapping is contained in a ChargeActivationModel and
managed by subscription operations.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargingMapping">
<xs:complexType>
<xs:sequence>
<xs:element ref="creditLimitItem" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="chargingReferenceCode" type="xs:string" use="required"/>
<xs:attribute name="prepaidAccountCode" type="xs:string"/>
<xs:attribute name="externalAccountCode" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="creditLimitItem">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
CREDIT_LIMIT_NAME |
static String |
DEFAULT_REFERENCE |
static String |
MODEL_NAME |
| Constructor and Description |
|---|
ChargingMappingModel()
Constructs an empty charging model.
|
ChargingMappingModel(String chargingReference,
String prepaidAccount,
String externalAccount,
Vector<String> creditLimits)
Initializes a subscriber account with its owner, its code and its subscriber.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String name,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getChargingReferenceCode()
Returns the code of charging reference.
|
List<String> |
getCreditLimitBalances()
Returns a list of credit limit balances code.
|
String |
getExternalAccountCode()
Returns the code of the external account.
|
String |
getPrepaidAccountCode()
Returns the code of the prepaid account.
|
boolean |
isExternalAccount()
Returns true if the mapping references a external account, false otherwise.
|
boolean |
isPrepaidAccount()
Returns true if the mapping references a prepaid account, false otherwise.
|
boolean |
isValid()
Returns true if the model is valid, false otherwise.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setChargingReferenceCode(String chargingReferenceCode)
Sets the code of charging reference.
|
void |
setCreditLimitBalances(List<String> creditLimits)
Sets the list of credit limit balances.
|
void |
setExternalAccountCode(String externalAccountCode)
Sets the code of the external account.
|
void |
setPrepaidAccountCode(String prepaidAccountCode)
Sets the code of the prepaid account.
|
public static final String MODEL_NAME
public static final String CREDIT_LIMIT_NAME
public static final String DEFAULT_REFERENCE
public ChargingMappingModel()
public ChargingMappingModel(String chargingReference, String prepaidAccount, String externalAccount, Vector<String> creditLimits)
chargingReference - the code of the charging referenceprepaidAccount - the prepaid account of the subscriber accountexternalAccount - the external account of the subscriber accountcreditLimits - the list of credit limit balance codespublic String getChargingReferenceCode()
setChargingReferenceCode(String)public void setChargingReferenceCode(String chargingReferenceCode)
chargingReferenceCode - String code which represents the code of charging reference.getChargingReferenceCode()public List<String> getCreditLimitBalances()
public void setCreditLimitBalances(List<String> creditLimits)
creditLimits - Listpublic String getExternalAccountCode()
public void setExternalAccountCode(String externalAccountCode)
externalAccountCode - String code which represents the code of the external account.public String getPrepaidAccountCode()
public void setPrepaidAccountCode(String prepaidAccountCode)
prepaidAccountCode - String code which represents the code of the prepaid account.public boolean isPrepaidAccount()
public boolean isExternalAccount()
public boolean isValid()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(String name, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into